package com.iwhalecloud.uncc.model;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class InsCollectStrategy {

    private Long policyId;
    private Integer abstractId;
    private String name;
    private String dataType;
    private String indexGroup;
    private Date startTime;
    private Date endTime;
    private Integer runTime;
    private Integer runTimeLimit;
    private Integer policyType;
    private String policyStatus;
    private String collectCrontab;
    private String collectPeriod;
    private String delayPeriod;
    private Integer isCmd;
    private Integer retryCount;
    private String blockHandle;
    private Integer idleTimeout;
    private String timeStamp;
    private String batchNo;
    private String nextBatchNo;
    private Integer checkState;
    private String checkDesc;
    private Date dataStartTime;
    private Date dataEndTime;
    private Date planRunTime;

    private Long serviceId;
    private List<Long> sourceIdList;
    private Long resourceId;
    // 按优先级排序
    private List<String> templateIds;
    private String dispatchDate;
    private String routeRuleId;

    //补采
    private Integer supplement; //补采标识，用于任务转移重新生成任务实例
    private String supplementBatchNo; //补采批次，用于任务转移重新生成任务实例
    private Long supplementParentTaskId; //补采上个采集任务Id，用于任务转移重新生成任务实例
    private Long supplementRootTaskId; //补采根采集任务Id，用于任务转移重新生成任务实例
    private Date supplementDispatchDate; //补采的派发时间
    private String requestId;//即时任务请求id;

    private Integer tryCount = 0; //采集尝试次数

    //重派发标识
    private Integer reDispatch; //重派发，若任务派发时出现采集服务实例无法找到或派发时多次超时，进行重新派发

    private String neParam; //网元采集任务信息，用于任务调度
    private Integer alaSyncType;//同步告警：1实时；2历史。用户订阅

    private String cmdParam;//即采动态指令参数

    private Map param;

    private String msgId;//多云参数

    private InsCollectStrategy nextStratgye;

    public Map getParam() {
        return param;
    }

    public void setParam(Map param) {
        this.param = param;
    }

    public Integer getReDispatch() {
        return reDispatch;
    }

    public void setReDispatch(Integer reDispatch) {
        this.reDispatch = reDispatch;
    }

    public String getCmdParam() {
        return cmdParam;
    }

    public void setCmdParam(String cmdParam) {
        this.cmdParam = cmdParam;
    }

    public Long getSupplementParentTaskId() {
        return supplementParentTaskId;
    }

    public void setSupplementParentTaskId(Long supplementParentTaskId) {
        this.supplementParentTaskId = supplementParentTaskId;
    }

    public Long getSupplementRootTaskId() {
        return supplementRootTaskId;
    }

    public void setSupplementRootTaskId(Long supplementRootTaskId) {
        this.supplementRootTaskId = supplementRootTaskId;
    }

    public String getSupplementBatchNo() {
        return supplementBatchNo;
    }

    public void setSupplementBatchNo(String supplementBatchNo) {
        this.supplementBatchNo = supplementBatchNo;
    }

    public Integer getRunTime() {
        return runTime;
    }

    public void setRunTime(Integer runTime) {
        this.runTime = runTime;
    }

    public Integer getRunTimeLimit() {
        return runTimeLimit;
    }

    public void setRunTimeLimit(Integer runTimeLimit) {
        this.runTimeLimit = runTimeLimit;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public Integer getAbstractId() {
        return abstractId;
    }

    public void setAbstractId(Integer abstractId) {
        this.abstractId = abstractId;
    }

    public Integer getAlaSyncType() {
        return alaSyncType;
    }

    public void setAlaSyncType(Integer alaSyncType) {
        this.alaSyncType = alaSyncType;
    }

    public Long getResourceId() {
        return resourceId;
    }

    public void setResourceId(Long resourceId) {
        this.resourceId = resourceId;
    }

    public List<String> getTemplateIds() {
        return templateIds;
    }

    public void setTemplateIds(List<String> templateIds) {
        this.templateIds = templateIds;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public String getNextBatchNo() {
        return nextBatchNo;
    }

    public void setNextBatchNo(String nextBatchNo) {
        this.nextBatchNo = nextBatchNo;
    }

    public void setSupplement(Integer supplement) {
        this.supplement = supplement;
    }

    public Integer getSupplement() {
        return supplement;
    }

    public String getNeParam() {
        return neParam;
    }

    public void setNeParam(String neParam) {
        this.neParam = neParam;
    }

    public Long getPolicyId() {
        return policyId;
    }

    public void setPolicyId(Long policyId) {
        this.policyId = policyId;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getIndexGroup() {
        return indexGroup;
    }

    public void setIndexGroup(String indexGroup) {
        this.indexGroup = indexGroup;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getPolicyType() {
        return policyType;
    }

    public void setPolicyType(Integer policyType) {
        this.policyType = policyType;
    }

    public String getPolicyStatus() {
        return policyStatus;
    }

    public void setPolicyStatus(String policyStatus) {
        this.policyStatus = policyStatus;
    }

    public String getCollectCrontab() {
        return collectCrontab;
    }

    public void setCollectCrontab(String collectCrontab) {
        this.collectCrontab = collectCrontab;
    }

    public String getCollectPeriod() {
        return collectPeriod;
    }

    public void setCollectPeriod(String collectPeriod) {
        this.collectPeriod = collectPeriod;
    }

    public String getDelayPeriod() {
        return delayPeriod;
    }

    public void setDelayPeriod(String delayPeriod) {
        this.delayPeriod = delayPeriod;
    }

    public String getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(String timeStamp) {
        this.timeStamp = timeStamp;
    }

    public Integer getCheckState() {
        return checkState;
    }

    public void setCheckState(Integer checkState) {
        this.checkState = checkState;
    }

    public String getCheckDesc() {
        return checkDesc;
    }

    public void setCheckDesc(String checkDesc) {
        this.checkDesc = checkDesc;
    }

    public Integer getIsCmd() {
        return isCmd;
    }

    public void setIsCmd(Integer isCmd) {
        this.isCmd = isCmd;
    }

    public Date getSupplementDispatchDate() {
        return supplementDispatchDate;
    }

    public void setSupplementDispatchDate(Date supplementDispatchDate) {
        this.supplementDispatchDate = supplementDispatchDate;
    }

    public String getBlockHandle() {
        return blockHandle;
    }

    public void setBlockHandle(String blockHandle) {
        this.blockHandle = blockHandle;
    }

    public Integer getRetryCount() {
        return retryCount;
    }

    public void setRetryCount(Integer retryCount) {
        this.retryCount = retryCount;
    }

    public Integer getIdleTimeout() {
        return idleTimeout;
    }

    public void setIdleTimeout(Integer idleTimeout) {
        this.idleTimeout = idleTimeout;
    }

    public Integer getTryCount() {
        return tryCount;
}

    public void setTryCount(Integer tryCount) {
        this.tryCount = tryCount;
    }

    public String getDispatchDate() {
        return dispatchDate;
    }

    public void setDispatchDate(String dispatchDate) {
        this.dispatchDate = dispatchDate;
    }

    public Date getDataStartTime() {
        return dataStartTime;
    }

    public void setDataStartTime(Date dataStartTime) {
        this.dataStartTime = dataStartTime;
    }

    public Date getDataEndTime() {
        return dataEndTime;
    }

    public void setDataEndTime(Date dataEndTime) {
        this.dataEndTime = dataEndTime;
    }

    public Date getPlanRunTime() {
        return planRunTime;
    }

    public void setPlanRunTime(Date planRunTime) {
        this.planRunTime = planRunTime;
    }

    public List<Long> getSourceIdList() {
        return sourceIdList;
    }

    public void setSourceIdList(List<Long> sourceIdList) {
        this.sourceIdList = sourceIdList;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public InsCollectStrategy getNextStratgye() {
        return nextStratgye;
    }

    public void setNextStratgye(InsCollectStrategy nextStratgye) {
        this.nextStratgye = nextStratgye;
    }

    public String getRouteRuleId() {
        return routeRuleId;
    }

    public void setRouteRuleId(String routeRuleId) {
        this.routeRuleId = routeRuleId;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        InsCollectStrategy other = (InsCollectStrategy) obj;
        if (!policyId.equals(other.policyId)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        return policyId.hashCode();
    }
}
